//存放公共方法文件

import moment from 'moment'

//日期格式-->前端展示:YYYY-MM-DD HH:mm
export function formateDate(data, formate = 'YYYY-MM-DD HH:mm') {
	return data ? moment(data).format(formate) : ''
}
//日期格式-->提交后台:UTC标准
export function formateDateToUTC(data) {
	return data ? moment(data).format() : ''
}

export function getStorage(key){
	return uni.getStorageSync(key)
}

export function setStorage(key,value){
	return uni.setStorageSync(key,value)
}

export function removeStorage(key){
	return uni.removeStorageSync(key)
}

export function showUniLoading(){
	uni.showLoading({
		title:"正在请求..."
	})
}

export function showToast({title,icon='none',duration=1500,...rest}){
	uni.showToast({
		title,
		icon,
		duration,
		...rest
	})
}

export function showModal({
	title="请求出错",
	content='服务器异常',
	showCancel=false,
	...ret
}){
	uni.showModal({
		title,
		content,
		showCancel,
		confirmText: '确定',
		cancelText:'取消',
		...ret
	});
}

//订单状态
export const orderStatusList = [
	{status:1,value:'待受理',count:5},
	{status:2,value:'待发货',count:3},
	{status:3,value:'代签收',count:1},
	{status:4,value:'已签收',count:0},
];

// export const hfMapPoint=[
// 	{id:0,title:'保税仓',latitude:31.724394,longitude:117.194488,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'保税仓',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// 	{id:1,title:'海关监管仓库',latitude:31.725795,longitude:117.192452,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'海关监管仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// 	{id:2,title:'仓站单证中心',latitude:31.725476,longitude:117.192631,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'仓站单证中心',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// 	{id:3,title:'6#仓库',latitude:31.734527,longitude:117.189792,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'6#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// 	{id:4,title:'5#仓库',latitude:31.731812,longitude:117.189762,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'5#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// 	{id:5,title:'4#仓库',latitude:31.731406,longitude:117.190344,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'4#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// 	{id:6,title:'海晨客服中心',latitude:31.734808,longitude:117.194546,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'海晨客服中心',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// 	{id:7,title:'2#仓库',latitude:31.735551,longitude:117.193363,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'2#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// 	{id:8,title:'1#仓库',latitude:31.73515,longitude:117.193958,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'1#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
// ]
export const hfMapPoint=[
	// {id:14,title:'保税仓',latitude:31.724394,longitude:117.194488,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'保税仓',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:13,title:'海关监管仓库',latitude:31.725795,longitude:117.192452,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'海关监管仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:12,title:'仓站单证中心',latitude:31.725476,longitude:117.192631,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'仓站单证中心',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:11,title:'海晨客服中心',latitude:31.734808,longitude:117.194546,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'海晨客服中心',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:10,title:'崧贸',latitude:31.733633,longitude:117.198234,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'崧贸',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:9,title:'保税仓二厂',latitude:31.723704,longitude:117.195585,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'保税仓二厂',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:8,title:'保税仓一厂',latitude:31.72307,longitude:117.194893,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'保税仓一厂',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:7,title:'7#仓库',latitude:31.742032,longitude:117.197215,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'7#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:6,title:'6#仓库',latitude:31.734527,longitude:117.189792,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'6#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:5,title:'5#仓库',latitude:31.731812,longitude:117.189762,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'5#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:4,title:'4#仓库',latitude:31.731406,longitude:117.190344,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'4#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:3,title:'2#仓库P',latitude:31.735551,longitude:117.193363,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'2#仓库P',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:2,title:'2#仓库',latitude:31.735551,longitude:117.193363,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'2#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
	{id:1,title:'1#仓库',latitude:31.73515,longitude:117.193958,iconPath:'/static/img/point.png',alpha:0.5,	width:40,height:40,	callout:{content:'1#仓库',fontSize:13,borderRadius	:10,display:'ALWAYS',padding:10}},
]